/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jse;

/**
 *
 * @author WangShuai
 */
public class Equals {
    public static void main(String[] args) {
        Long a = 1l;
        Long b = new Long(1l);
        Long c = 1l;
        System.out.println(a==b);        //false   在实际应用实体bean中类似此种情况
        System.out.println(a.equals(b));   //true
        System.out.println(a==c);   //true
        System.out.println(a.equals(c));   //true
    }

}
